1. Technical Field
The invention relates to a method for adding a moving picture on top of a larger moving picture. The method is applicable to cases in which the picture signals are compressed digital signals. The invention also relates to an arrangement for adding a moving picture on top of a larger moving picture.
2. Discussion of Related Art
The picture-in-picture (PIP) feature is a widely used technique at the transmitting end when making a television program, for example. Within the main picture a considerably smaller picture is temporarily inset which displays, say, a simultaneous event that is likely to interest the viewer. The addition of a secondary picture to the main picture may also occur at the receiving end, controlled by the user of the receiver. One or more smaller pictures may e.g. display programs running on other channels while the main picture is being viewed without interruption. The present invention relates particularly to the use of the PIP feature at the receiving end.
When compressing a digitized video signal it is customary to divide an individual picture frame into blocks which typically comprise 8xc3x978 picture elements, or pixels. A square portion of a frame, comprised of four blocks, is called a macro block. Compression, i.e. reduction of the number of bits, is realized using intra-frame coding and inter-frame coding. The former includes e.g. predictive coding utilizing positional redundancy or the use of discrete cosine transform (DCT) concentrating signal energy of a picture block. The numbers produced by the transform are quantized in a manner that reduces the quantity of bits and ordered in a sequence where the occurrence of strings of consecutive zeroes is statistically high. These strings of zeroes are represented by a number indicating the quantity of the zeroes (this is called run length coding, RLC). Other numbers are encoded such that a frequently occurring number is represented by fewer bits than a number that occurs less frequently (variable length coding, VLC). Inter-frame coding includes predictive inter-frame coding, motion estimation comparing the contents of macro blocks at different positions, utilizing temporal redundancy and temporal interpolation of reference frames in order to produce the code for the frames between them. By combining various coding methods it is possible to reduce the number of bits transmitted down to a hundredth part of the original without substantially compromising the quality of the picture. At the receiving end of the video signal a video decoder performs the reverse operations. On the transmission path, several video signals may travel packet switched in the same transport stream (TS) so that the receiver first has to extract an individual video signal from it.
From the prior art is known a PIP method wherein two encoded video signals are separately decoded and combined after the decoding. Prior to combining, one of the video pictures is reduced in size. This can be done by selecting e.g. every fourth block in both the horizontal and vertical dimension of the video signal or by producing by means of interpolation a new macro block from each 4xc3x975 macro block group. At a desired location of the normal-sized picture the macro blocks are then replaced by the macro blocks of the reduced picture. In this description and in the claims such a reduced picture is called a xe2x80x9cmini-picturexe2x80x9d. The prefix xe2x80x9cminixe2x80x9d means that the inset picture does not cover the whole main picture. FIG. 1 shows in the form of functional block diagram such a system according to the prior art. The system comprises decoders 110 and 120 as well as a PIP unit 130. A video signal ES1 (so-called xe2x80x9celementary streamxe2x80x9d) is brought to decoder 110 and video signal ES2 to decoder 120. Signals ES1 and ES2 are encoded e.g. according to the MPEG2 (Motion Picture Experts Group) standard. Decoder 110 outputs video signal VD1 and decoder 120 video signal VD2. The PIP unit 130 comprises a scaling unit 131, selector 132 and timing unit 133. Signal VD1 is directed straight to the selector. Signal VD2 is directed to the scaling unit 131 the output signal VD2xe2x80x2 of which is conducted to the selector. The output signal VDO of the selector 132 is either signal VD1 or signal VD2xe2x80x2 depending on the status of the selection signal S output by the timing unit 133. Always when the picture-generating system enters the area intended for the mini-picture, signal S goes into a state that conducts signal VD2xe2x80x2 to the output of selector 132. At other times, signal S in a state that conducts signal VD1 to the output of selector 132. The functional blocks shown in FIG. 1 are realized partly in software and partly in hardware.
A disadvantage of the method described above is that it requires a double decoding operation. So, when using a signal processor, a double decoding capacity is required of it, which results in considerable extra costs. Another disadvantage is that in practice, for the reason stated above, only one mini-picture may be inset in the main picture.
An object of the invention is to eliminate the above-described disadvantages associated with the prior art.
In accordance with a first aspect of the invention, a method for insetting a moving secondary picture in a moving main picture, in which method the signals of said pictures are in an encoded digital format and the secondary picture is scaled down by reducing the number of macro blocks included in each individual frame of the picture and the scaled-down frame is inset as a mini-picture in the frame of the main picture, is characterized in that said insetting is performed prior to the decoding of the picture signals.
In further accord with the first aspect of the invention, in order to inset the frame of the scaled down secondary picture, or mini-picture, the code of the macro blocks in a certain area of the frame of the main picture are replaced by the code of the macro blocks of the frame of the mini-picture.
Still in accord with the first aspect of the invention, the reduction of the number of macro blocks in a frame is realized by leaving a selected number of macro blocks at regular intervals both in the horizontal and in the vertical dimension.
Still further in accord with the first aspect of the invention, the reduction of the number of macro blocks in a frame is realized by compiling each new macro block from the blocks of at least two original macro blocks.
Further still in accord with the first aspect of the invention, the reduction of the number of encoded macro blocks in a frame is realized by decoding the video signal to be scaled down by including in the decoding from each block at least the number that represents the dc component of the video signal, producing one new macro block by means of interpolation from a predetermined number of macro blocks produced, and encoding the signal produced using the same coding method as that used for the signal of the main picture.
According further to the first aspect of the invention, there are at least two secondary pictures to be inset in the main picture.
According still further to the first aspect of the invention, in which the code of the main picture and the code of the secondary picture are transmitted in fixed-form packets via the same transmission path as part of a transport stream, the packets belonging to said pictures are extracted from the transport stream on the basis of identifiers in the headers of the packets and a coherent main picture code and coherent secondary picture code are generated and then combined.
According to a second aspect of the invention, an arrangement for insetting a moving secondary picture in a moving main picture, the signals of said pictures being in an encoded digital format and the arrangement comprising means for scaling down each individual frame in the secondary picture and combining them with the frame of the main picture, also comprises a decoder to decoding the combined frame code into a video signal.
Further according to the second aspect of the invention, the means for scaling down an individual frame and combining it with the frame of the main picture comprises a unit for reducing the number of the macro blocks in a frame, a selector for picture signals, and a timing unit for placing the mini-picture at a certain location in the main picture.
In still further accord with the second aspect of the invention, the arrangement also comprises means for extracting the encoded signal of the main picture from the transport stream comprised of data packets, and for extracting the encoded signal of the secondary picture from said transport stream.
According to a third aspect of the invention, a receiver comprises a combiner responsive to at least two video signals for providing an output signal, and a decoder, responsive to said output signal, for providing a decoded output signal for simultaneously displaying at least two pictures corresponding to said at least two video signals.
The main idea of the invention is that the video signals are combined prior to the decoding. The encoded macro blocks of the area of the main picture intended for the mini-picture are replaced by macro blocks from another picture. These are obtained e.g. by taking macro blocks at regular intervals in such a manner that their total number equals the number of macro blocks that corresponds to the mini-picture area. A single mini-picture macro block may also be produced by assembling it from selected blocks of several original macro blocks or by interpolating a plurality of original macro blocks into a single macro block. The combined signal is then decoded.
An advantage of the invention is that a receiver only needs one decoder. In video processing, decoding is the part that requires the most computing. Another advantage of the invention is that several mini-pictures can be inset in the main picture with only minimum added computation. A further advantage of the invention is that the decoder is detached from the rest of the receiver so that the capacity of the transmission system between the decoder and receiver may be dimensioned according to the band of one channel only. Yet another advantage of the invention is that if the video signals to be combined are brought to the receiver in the same transport stream, only one complete demultiplexer is required which extracts from the transport stream the packets relating to all auxiliary activities as well.